package cn.tedu.spring.security.web;

public enum ServiceCode {
    OK(20000),  // new ServiceCode(1)  getValue() = 1
    ERR_BAD_REQUEST(40000), // new ServiceCode(2) getValue() = 2
    ERR_UNAUTHORIZED(40100),
    ERR_UNAUTHORIZED_DISABLE(40101),
    ERR_FORBIDDEN(40300),
    ERR_NOT_FOUND(40400),
    ERR_CONFLICT(40900),
    ERR_INSERT(50000),
    ERR_DELETE(50100),
    ERR_UPDATE(50200),
    ERR_JWT_EXPIRED(60000),
    ERR_JWT_MALFORMED(60100),
    ERR_JWT_SIGNATURE(60200),
    /**
     * 错误：上传的文件为空（没有选择有效的文件）
     */
    ERROR_UPLOAD_EMPTY(90000),
    /**
     * 错误：上传的文件类型有误
     */
    ERROR_UPLOAD_INVALID_TYPE(90100),
    /**
     * 错误：上传的文件超出限制
     */
    ERROR_UPLOAD_EXCEED_MAX_SIZE(90200),
    ERR_UNKNOWN(99999);

    private Integer value;

    public Integer getValue() {
        return value;
    }
    ServiceCode(Integer value){
        this.value = value;
    }
}
